<%--
  @author Duminda Dharmakeerthi
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script type="text/javascript">
    function changeLanguage(language) {
        var url = '${"changePreferredLanguage.do?prefLanguage=' + language + '"}';
        $.post(url, function (data) {
            window.location.replace('detailFormMobile.do');

        });
    }
</script>
<table class="width-100">
    <tr>
        <td rowspan="2">
            <div id="header-logo">
                <img src="${pageContext.request.contextPath}/images/logo-mobile.png" alt=""/>
            </div>
        </td>
        <td>
            <div id="title">
                <%--    <s:property value="@lk.icta.common.AppConstants@APPLICATION_NAME_SI"/> </br>
              <s:property value="@lk.icta.common.AppConstants@APPLICATION_NAME_TA"/> </br>--%>
                <s:property value="@lk.icta.common.AppConstants@APPLICATION_NAME_EN"/>
            </div>

            <%--<div id="user-province">
                <h3><s:label value="%{getText('western_province.label')}"/></h3>
            </div>--%>
        </td>

        <%--</tr>--%>
        <s:if test="user != null">
            <%-- <tr>--%>
            <td>
                <div id="user-profile">
                    <ul>
                        <li><span class="left" style="color: #fff;">
                            <s:label value="%{getText('welcome.label')}"/>
                            <s:property value="user.username"/> | <s:property
                                value="user.role.id"/> !</span>
                                <%--<s:a href="homeMobile.do"><img src="${pageContext.request.contextPath}/images/home.png" alt=""><span>
                               <s:label value="%{getText('home.label')}"/></span></s:a>--%>
                            <s:a href="logoutMobile.do"><img src="${pageContext.request.contextPath}/images/logout.png"
                                                             alt=""><span>
               <s:label value="%{getText('logout.label')}"/></span></s:a></li>
                    </ul>
                    <s:if test="user != null && user.loginState.toString() == 'NORMAL'">
                        <ul>
                            <li>

                                <s:a href="#" onclick="changeLanguage('si')"> <s:label value="සිංහල"/></s:a>
                                <s:a href="#" onclick="changeLanguage('ta')"><s:label value="தமிழ்"/></s:a>
                                <s:a href="#" onclick="changeLanguage('en')"> <s:label value="English"/></s:a>
                            </li>
                        </ul>
                    </s:if>
                </div>
            </td>

        </s:if>
    </tr>
</table>

<%--
<div id="user-language">
    <ul>
        <li><s:a href="#"><img src="${pageContext.request.contextPath}/images/si_LK.png" alt=""></s:a></li>
        <li><s:a href="#"><img src="${pageContext.request.contextPath}/images/ta_IN.png" alt=""></s:a></li>
        <li><s:a href="#"><img src="${pageContext.request.contextPath}/images/en_US.png" alt=""></s:a></li>
    </ul>
</div>
--%>
